//
//  AppConfig.swift
//  TestXCConfig
//
//  Created by shinho on 2021/4/28.
//

import Foundation

struct AppConfig {
    public enum AppConfigType {
        case Debug
        case Release
        case ReleaseTest
    }
    
    public enum AppTargetType {
        case TestConfig
        case TestConfig_Copy
    }
    
    public static var currentTarget: AppTargetType {
        #if TESTCONFIG
            return .TestConfig
        #elseif TESTCONFIG_COPY
            return .TestConfig_Copy
        #else
            return .TestConfig
        #endif
    }
    
    public static var currentConfig: AppConfigType {
        #if DEBUG
            return .Debug
        #elseif RELEASE_TEST
            return .ReleaseTest
        #else
            return .Release
        #endif
    }
    
    static var webServerURL: String {
        switch currentConfig {
            case .Debug:
                return "test url"
            default:
                return "release url"
        }
    }
}
